<template>
	<view>
		<view class="box">
			<view class="menu_content_box">
				<view class="mt25 pb5 fs32 fwb cor_000 tac">看车编号：{{id}}</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">设备认证</view>
							</view>
						</view>
						<!-- 		<view class="df">
								<view class="fs28 cor_000">2项</view>
								<image src="/static/icon_abnormal.png" class="ml10 img7"></image>
								<view class="ml25 fs28 cor_000">3项</view>
								<image src="/static/icon_security_2.png" class="ml10 img7"></image>
								<image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
							</view> -->
					</view>
					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">发动机品牌</view>
							<view class="item">
								<input type="text" class="ipt_01" placeholder="请输入发动机品牌"
									placeholder-style="color: #333;" v-model="brand_name">
							</view>
							<image src="/static/icon_security_2.png" class="ml20 vh img7"></image>
						</view>


						<view class="flex_box aic">
							<view class="fs28 cor_333">发动机生产年份</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindPickerDate" :value="date" mode=date fields="year">
										<text class="fz28">{{date}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>


						<view class="flex_box aic">
							<view class="fs28 cor_333">机身铭牌</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMachineNameplateChange" :value="machine_nameplate"
										:range="machine_nameplate_array" range-key="name">
										<text class="fs28">{{machine_nameplate_array[machine_nameplate].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">机身大架号</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMachineNoChange" :value="machine_no"
										:range="machine_no_array" range-key="name">
										<text class="fs28">{{machine_no_array[machine_no].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">合格证</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindCertificateChange" :value="certificate"
										:range="certificate_array" range-key="name">
										<text class="fs28">{{certificate_array[certificate].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">购机发票</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindInvoicePaperChange" :value="invoice_paper"
										:range="invoice_paper_array" range-key="name">
										<text class="fs28">{{invoice_paper_array[invoice_paper].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">进口报关单</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindImportPaperChange" :value="import_paper"
										:range="import_paper_array" range-key="name">
										<text class="fs28">{{import_paper_array[import_paper].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

					</view>
				</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">整车漆面</view>
							</view>
						</view>
						<!-- 		<view class="df">
                                    <view class="fs28 cor_000">2项</view>
                                    <image src="/static/icon_abnormal.png" class="ml10 img7"></image>
                                    <view class="ml25 fs28 cor_000">3项</view>
                                    <image src="/static/icon_security_2.png" class="ml10 img7"></image>
                                    <image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
                                </view> -->
					</view>
					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">整车漆面</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMachinePaintChange" :value="machine_paint"
										:range="machine_paint_array" range-key="name">
										<text class="fs28">{{machine_paint_array[machine_paint].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">驾驶室正前和工具箱位置</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindDriverPaintChange" :value="driver_paint"
										:range="driver_paint_array" range-key="name">
										<text class="fs28">{{driver_paint_array[driver_paint].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>
					</view>
				</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">工作装置</view>
							</view>
						</view>
						<!-- 		<view class="df">
                                        <view class="fs28 cor_000">2项</view>
                                        <image src="/static/icon_abnormal.png" class="ml10 img7"></image>
                                        <view class="ml25 fs28 cor_000">3项</view>
                                        <image src="/static/icon_security_2.png" class="ml10 img7"></image>
                                        <image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
                                    </view> -->
					</view>
					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">大臂</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMainArmChange" :value="main_arm"
										:range="main_arm_array" range-key="name">
										<text class="fs28">{{main_arm_array[main_arm].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">小臂</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindSubArmChange" :value="sub_arm" :range="sub_arm_array"
										range-key="name">
										<text class="fs28">{{sub_arm_array[sub_arm].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">大臂油缸左</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMainArmCylinderLeftChange"
										:value="main_arm_cylinder_left" :range="main_arm_cylinder_left_array"
										range-key="name">
										<text
											class="fs28">{{main_arm_cylinder_left_array[main_arm_cylinder_left].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">大臂油缸右</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMainArmCylinderRightChange"
										:value="main_arm_cylinder_right" :range="main_arm_cylinder_right_array"
										range-key="name">
										<text
											class="fs28">{{main_arm_cylinder_right_array[main_arm_cylinder_right].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">小臂油缸</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindSubArmCylinderChange" :value="sub_arm_cylinder"
										:range="sub_arm_cylinder_array" range-key="name">
										<text class="fs28">{{sub_arm_cylinder_array[sub_arm_cylinder].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">铲斗油缸</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindBucketlinderChange" :value="bucket_cylinder"
										:range="bucket_cylinder_array" range-key="name">
										<text class="fs28">{{bucket_cylinder_array[bucket_cylinder].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">铲斗类型</view>
							<view class="item">
								<input type="text" class="ipt_01" placeholder="请输入铲斗类型" placeholder-style="color: #333;"
									v-model="bucket_type">
							</view>
							<image src="/static/icon_security_2.png" class="ml20 vh img7"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">铲斗外观</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindBucketFacadeChange" :value="bucket_facade"
										:range="bucket_facade_array" range-key="name">
										<text class="fs28">{{bucket_facade_array[bucket_facade].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">下车架/X型架</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindStentsChange" :value="stents" :range="stents_array"
										range-key="name">
										<text class="fs28">{{stents_array[stents].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>
					</view>
				</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">行走机构</view>
							</view>
						</view>
						<!-- 		<view class="df">
                                        <view class="fs28 cor_000">2项</view>
                                        <image src="/static/icon_abnormal.png" class="ml10 img7"></image>
                                        <view class="ml25 fs28 cor_000">3项</view>
                                        <image src="/static/icon_security_2.png" class="ml10 img7"></image>
                                        <image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
                                    </view> -->
					</view>
					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">履带板</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindCaterpillarChange" :value="caterpillar"
										:range="caterpillar_array" range-key="name">
										<text class="fs28">{{caterpillar_array[caterpillar].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">链筋</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindChainChange" :value="chain" :range="chain_array"
										range-key="name">
										<text class="fs28">{{chain_array[chain].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">驱动轮</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindDrivingWheelChange" :value="driving_wheel"
										:range="driving_wheel_array" range-key="name">
										<text class="fs28">{{driving_wheel_array[driving_wheel].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>


					</view>
				</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">驾驶室</view>
							</view>
						</view>
						<!-- 		<view class="df">
                                        <view class="fs28 cor_000">2项</view>
                                        <image src="/static/icon_abnormal.png" class="ml10 img7"></image>
                                        <view class="ml25 fs28 cor_000">3项</view>
                                        <image src="/static/icon_security_2.png" class="ml10 img7"></image>
                                        <image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
                                    </view> -->
					</view>
					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">驾驶室门</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindDrivingDoorChange" :value="driving_door"
										:range="driving_door_array" range-key="name">
										<text class="fs28">{{driving_door_array[driving_door].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">驾驶室顶部</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindDrivingRoofChange" :value="driving_roof"
										:range="driving_roof_array" range-key="name">
										<text class="fs28">{{driving_roof_array[driving_roof].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">仪表显示器</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindInstrumentChang" :value="instrument"
										:range="instrument_array" range-key="name">
										<text class="fs28">{{instrument_array[instrument].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">小时表</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindHoursInstrumentChang" :value="hours_instrument"
										:range="hours_instrument_array" range-key="name">
										<text class="fs28">{{hours_instrument_array[hours_instrument].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>
					</view>
				</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">主要部件</view>
							</view>
						</view>
						<!-- 		<view class="df">
                                        <view class="fs28 cor_000">2项</view>
                                        <image src="/static/icon_abnormal.png" class="ml10 img7"></image>
                                        <view class="ml25 fs28 cor_000">3项</view>
                                        <image src="/static/icon_security_2.png" class="ml10 img7"></image>
                                        <image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
                                    </view> -->
					</view>
					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">液压泵</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindHydraulicPumpChange" :value="hydraulic_pump"
										:range="hydraulic_pump_array" range-key="name">
										<text class="fs28">{{hydraulic_pump_array[hydraulic_pump].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">回转马达</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindRotaryMotorChange" :value="rotary_motor"
										:range="rotary_motor_array" range-key="name">
										<text class="fs28">{{rotary_motor_array[rotary_motor].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">主控阀</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindMainControlChange" :value="main_control"
										:range="main_control_array" range-key="name">
										<text class="fs28">{{main_control_array[main_control].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">电瓶</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindBatteryChange" :value="battery" :range="battery_array"
										range-key="name">
										<text class="fs28">{{battery_array[battery].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">发动机</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindEngineChange" :value="engine" :range="engine_array"
										range-key="name">
										<text class="fs28">{{engine_array[engine].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">发动机铭牌</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindEngineNameplateChange" :value="engine_nameplate"
										:range="engine_nameplate_array" range-key="name">
										<text class="fs28">{{engine_nameplate_array[engine_nameplate].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>
					</view>
				</view>

				<view class="mt15 area_block_1">
					<view class="flex_box aic">
						<view class="item">
							<view class="df">
								<image src="/static/icon_car.png" class="img18"></image>
								<view class="ml5 fs30 fwb cor_000">试车</view>
							</view>
						</view>
						<!-- 		<view class="df">
                                        <view class="fs28 cor_000">2项</view>
                                        <image src="/static/icon_abnormal.png" class="ml10 img7"></image>
                                        <view class="ml25 fs28 cor_000">3项</view>
                                        <image src="/static/icon_security_2.png" class="ml10 img7"></image>
                                        <image src="/static/icon_arrow_5.png" class="ml15 img7"></image>
                                    </view> -->
					</view>

					<view class="mt30">
						<view class="flex_box aic">
							<view class="fs28 cor_333">是否试车</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindTestRunChange" :value="test_run"
										:range="test_run_array" range-key="name">
										<text class="fs28">{{test_run_array[test_run].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">试车日期</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindTestRunPickerDate" :value="test_run_date" mode=date :disabled="disabled">
										<text class="fz28">{{test_run_date}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">怠速支车</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindIdlingArrayChange" :value="idling"
										:range="idling_array" range-key="name" :disabled="disabled">
										<text class="fs28">{{idling_array[idling].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">排气烟色</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindExhaustArrayChange" :value="exhaust"
										:range="exhaust_array" range-key="name"  :disabled="disabled">
										<text class="fs28">{{exhaust_array[exhaust].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						<view class="flex_box aic">
							<view class="fs28 cor_333">行走</view>
							<view class="item">
								<view class="sel_area_sty">
									<picker class="" @change="bindTravelArrayChange" :value="travel"
										:range="travel_array" range-key="name"  :disabled="disabled">
										<text class="fs28">{{travel_array[travel].name}}</text>
									</picker>
								</view>
							</view>
							<image src="/static/icon_arrow_4.png" class="ml20 img15"></image>
						</view>

						
					</view>
				</view>
			</view>
		</view>
		<!-- 下一步-按钮 -->
		<view class="consult_immediately_btn" @tap="uploadTestResult">下一步</view>

	</view>
	<!-- area_block_1 -->

	</view>

	</view>
	<!-- box -->
	</view>
</template>

<script>
	import {
		toast,
		showLoading,
		hideLoading
	} from '@/utils/toast.js';
	import {
		getTestKVApi,
		uploadTestResultApi
	} from '@/http/api.js';
	export default {
		data() {
			return {
				id: '',
				diggerId: '',
				array: ['请选择机身铭牌', '正常', '模糊', '损毁'],
				index: 0,
				date: '请选择发动机生产年份',
				step: 0,
				filterArray: [],
				engine_brand: '',
				engine_date: '',
				brand_name: '',
				//铭牌
				machine_nameplate_array: [],
				machine_nameplate: 0,
				//编号
				machine_no_array: [],
				machine_no: 0,
				//合格证
				certificate_array: [],
				certificate: 0,
				//发票
				invoice_paper_array: [],
				invoice_paper: 0,
				//报关单
				import_paper_array: [],
				import_paper: 0,
				//整车油漆
				machine_paint_array: [],
				machine_paint: 0,
				//驾驶室正前和工具箱位置
				driver_paint_array: [],
				driver_paint: 0,
				//大臂
				main_arm_array: [],
				main_arm: 0,
				//小臂
				sub_arm_array: [],
				sub_arm: 0,
				//大臂油缸左
				main_arm_cylinder_left_array: [],
				main_arm_cylinder_left: 0,
				//大臂油缸右
				main_arm_cylinder_right_array: [],
				main_arm_cylinder_right: 0,
				//小臂油缸
				sub_arm_cylinder_array: [],
				sub_arm_cylinder: 0,
				//铲斗油缸
				bucket_cylinder_array: [],
				bucket_cylinder: 0,
				//铲斗类型
				bucket_type: '',
				//铲斗外观
				bucket_facade_array: [],
				bucket_facade: 0,
				//下车架/X型架
				stents_array: [],
				stents: 0,
				//履带板
				caterpillar_array: [],
				caterpillar: 0,
				//链筋
				chain_array: [],
				chain: 0,
				//驱动轮
				driving_wheel_array: [],
				driving_wheel: 0,
				//驾驶室门
				driving_door_array: [],
				driving_door: 0,
				//驾驶室顶部
				driving_roof_array: [],
				driving_roof: 0,
				//仪器仪表
				instrument_array: [],
				instrument: 0,
				//小时表
				hours_instrument_array: [],
				hours_instrument: 0,
				//液压泵
				hydraulic_pump_array: [],
				hydraulic_pump: 0,
				//回转马达
				rotary_motor_array: [],
				rotary_motor: 0,
				//主控阀
				main_control_array: [],
				main_control: 0,
				//电瓶
				battery_array: [],
				battery: 0,
				//发动机
				engine_array: [],
				engine: 0,
				//发动机铭牌
				engine_nameplate_array: [],
				engine_nameplate: 0,
				//试车
				test_run_array: [],
				test_run: 0,
				//试车日期
				test_run_date: '请选择试车日期',
				//怠速支车
				idling_array: [],
				idling: 0,
				//排气烟色
				exhaust_array: [],
				exhaust: 0,
				//行驶
				travel_array: [],
				travel: 0,
				disabled: false
			}
		},
		onLoad(options) {
			console.log(options);
			if (options.id) {
				this.id = options.id;
			}
			if (options.diggerId) {
				this.diggerId = options.diggerId;
			}
			this.getTestKV();
		},
		methods: {
			bindPickerDate: function(e) { //发动机生产时间
				console.log('picker发送选择改变，携带值为', e.target.value);
				this.date = e.target.value
			},
			//铭牌
			bindMachineNameplateChange: function(e) {
				this.machine_nameplate = e.target.value
			},
			//机身大架号
			bindMachineNoChange: function(e) {
				this.machine_no = e.target.value
			},
			//合格证
			bindCertificateChange: function(e) {
				this.certificate = e.target.value
			},
			//购机发票
			bindInvoicePaperChange: function(e) {
				this.invoice_paper = e.target.value
			},
			//进口报关单
			bindImportPaperChange: function(e) {
				this.import_paper = e.target.value
			},
			//整车油漆
			bindMachinePaintChange: function(e) {
				this.machine_paint = e.target.value
			},
			//驾驶室正前和工具箱位置
			bindDriverPaintChange: function(e) {
				this.driver_paint = e.target.value
			},
			//大臂
			bindMainArmChange: function(e) {
				this.main_arm = e.target.value
			},
			//小臂
			bindSubArmChange: function(e) {
				this.sub_arm = e.target.value
			},
			//大臂油缸左
			bindMainArmCylinderLeftChange: function(e) {
				this.main_arm_cylinder_left = e.target.value
			},
			//大臂油缸右
			bindMainArmCylinderRightChange: function(e) {
				this.main_arm_cylinder_right = e.target.value
			},
			//小臂油缸
			bindSubArmCylinderChange: function(e) {
				this.sub_arm_cylinder = e.target.value
			},
			//铲斗油缸
			bindBucketlinderChange: function(e) {
				this.bucket_cylinder = e.target.value
			},
			//铲斗外观
			bindBucketFacadeChange: function(e) {
				this.bucket_facade = e.target.value
			},
			//下车架/X型架
			bindStentsChange: function(e) {
				this.stents = e.target.value
			},
			//履带板
			bindCaterpillarChange: function(e) {
				this.caterpillar = e.target.value
			},
			//链筋
			bindChainChange: function(e) {
				this.chain = e.target.value
			},
			//驱动轮
			bindDrivingWheelChange: function(e) {
				this.driving_wheel = e.target.value
			},
			//驾驶室门
			bindDrivingDoorChange: function(e) {
				this.driving_door = e.target.value
			},
			//驾驶室顶部
			bindDrivingRoofChange: function(e) {
				this.driving_roof = e.target.value
			},
			//仪器仪表
			bindInstrumentChange: function(e) {
				this.instrument = e.target.value
			},
			//小时表
			bindHoursInstrumentChange: function(e) {
				this.hours_instrument = e.target.value
			},
			//液压泵
			bindHydraulicPumpChange: function(e) {
				this.hydraulic_pump = e.target.value
			},
			//回转马达
			bindRotaryMotorChange: function(e) {
				this.rotary_motor = e.target.value
			},
			//主控阀
			bindMainControlChange: function(e) {
				this.main_control = e.target.value
			},
			//电瓶
			bindBatteryChange: function(e) {
				this.battery = e.target.value
			},
			//发动机
			bindEngineChange: function(e) {
				this.engine = e.target.value
			},
			//发动机铭牌
			bindEngineNameplateChange: function(e) {
				this.engine_nameplate = e.target.value
			},
			//试车
			bindTestRunChange: function(e) {
				this.test_run = e.target.value
				if (this.test_run == 1) {
					this.idling = 0;
					this.exhaust = 0;
					this.travel = 0;
					this.disabled = true;
				} else {
					this.disabled = false;
				}
			},
			//试车日期
			bindTestRunPickerDate: function(e) { //发动机生产时间
				console.log('picker发送选择改变，携带值为', e.target.value);
				this.test_run_date = e.target.value
			},
			//怠速支车
			bindIdlingArrayChange: function(e) {
				this.idling = e.target.value
			},
			//排气烟色
			bindExhaustArrayChange: function(e) {
				this.exhaust = e.target.value
			},
			//行驶
			bindTravelArrayChange: function(e) {
				this.travel = e.target.value
			},

			getTestKV() {
				let that = this;
				showLoading('加载中');
				getTestKVApi({

				}).then(res => {
					that.filterArray = res.data;
					//机身铭牌
					that.machine_nameplate_array = that.filterArray[0]['keys'][2]['values'];
					//机身大架号
					that.machine_no_array = that.filterArray[0]['keys'][3]['values'];
					//合格证
					that.certificate_array = that.filterArray[0]['keys'][4]['values'];
					//购机发票
					that.invoice_paper_array = that.filterArray[0]['keys'][5]['values'];
					//进口报关单
					that.import_paper_array = that.filterArray[0]['keys'][6]['values'];
					//整车漆面
					that.machine_paint_array = that.filterArray[1]['keys'][0]['values'];
					//驾驶室正面和工具箱漆面
					that.driver_paint_array = that.filterArray[1]['keys'][1]['values'];
					//大臂
					that.main_arm_array = that.filterArray[2]['keys'][0]['values'];
					//小臂
					that.sub_arm_array = that.filterArray[2]['keys'][1]['values'];
					//大臂油缸左
					that.main_arm_cylinder_left_array = that.filterArray[2]['keys'][2]['values'];
					//大臂油缸右
					that.main_arm_cylinder_right_array = that.filterArray[2]['keys'][3]['values'];
					//小臂油缸
					that.sub_arm_cylinder_array = that.filterArray[2]['keys'][4]['values'];
					//铲斗油缸
					that.bucket_cylinder_array = that.filterArray[2]['keys'][5]['values'];
					//铲斗外观
					that.bucket_facade_array = that.filterArray[2]['keys'][7]['values'];
					//下车架/X型架
					that.stents_array = that.filterArray[2]['keys'][8]['values'];
					//履带板
					that.caterpillar_array = that.filterArray[3]['keys'][0]['values'];
					//链筋
					that.chain_array = that.filterArray[3]['keys'][1]['values'];
					//驱动轮
					that.driving_wheel_array = that.filterArray[3]['keys'][2]['values'];
					//驾驶室门
					that.driving_door_array = that.filterArray[4]['keys'][0]['values'];
					//驾驶室顶部
					that.driving_roof_array = that.filterArray[4]['keys'][1]['values'];
					//仪器仪表
					that.instrument_array = that.filterArray[4]['keys'][2]['values'];
					//小时表
					that.hours_instrument_array = that.filterArray[4]['keys'][3]['values'];
					//液压泵
					that.hydraulic_pump_array = that.filterArray[5]['keys'][0]['values'];
					//回转马达
					that.rotary_motor_array = that.filterArray[5]['keys'][1]['values'];
					//主控阀
					that.main_control_array = that.filterArray[5]['keys'][2]['values'];
					//电瓶
					that.battery_array = that.filterArray[5]['keys'][3]['values'];
					//发动机
					that.engine_array = that.filterArray[5]['keys'][4]['values'];
					//发动机铭牌
					that.engine_nameplate_array = that.filterArray[5]['keys'][5]['values'];
					//是否试车
					that.test_run_array = that.filterArray[6]['keys'][0]['values'];
					//怠速支车
					that.idling_array = that.filterArray[6]['keys'][2]['values'];
					//排气烟色
					that.exhaust_array = that.filterArray[6]['keys'][3]['values'];
					//行驶
					that.travel_array = that.filterArray[6]['keys'][4]['values'];

					hideLoading();
				}).catch(err => {
					hideLoading();
				})
			},
			nextStep() {
				if (this.step < this.filterArray.length) {
					this.step = this.step + 1;
				}
			},
			prevStep() {
				if (this.step > 0) {
					this.step = this.step - 1;
				}
			},
			
			uploadTestResult() {
				let that = this;
				let reportItemList = [
					{
						"id": 11,
						"value": this.brand_name,
						"isConformity": 0
					},
					{
						"id": 12,
						"value": this.date,
						"isConformity": 0
					},
					{
						"id": 13,
						"value": this.machine_nameplate_array[this.machine_nameplate].name,
						"isConformity": this.machine_nameplate ? this.machine_nameplate : 1
					},
					{
						"id": 14,
						"value": this.machine_nameplate_array[this.machine_no].name,
						"isConformity": this.machine_no ? this.machine_no : 1
					},
					{
						"id": 15,
						"value": this.certificate_array[this.certificate].name,
						"isConformity": this.certificate ? this.certificate : 1
					},
					{
						"id": 16,
						"value": this.invoice_paper_array[this.invoice_paper].name,
						"isConformity": this.invoice_paper ? this.invoice_paper : 1
					},
					{
						"id": 17,
						"value": this.import_paper_array[this.import_paper].name,
						"isConformity": this.import_paper ? this.import_paper : 1
					},
					{
						"id": 18,
						"value":  this.machine_paint_array[this.machine_paint].name,
						"isConformity": this.machine_paint ? this.machine_paint : 1
					},
					{
						"id": 19,
						"value":  this.driver_paint_array[this.driver_paint].name,
						"isConformity": this.driver_paint ? this.driver_paint : 1
					},
					{
						"id": 20,
						"value": this.main_arm_array[this.main_arm].name,
						"isConformity": this.main_arm ? this.main_arm : 1
					},
					{
						"id": 21,
						"value": this.sub_arm_array[this.sub_arm].name,
						"isConformity": this.sub_arm ? this.sub_arm : 1
					},
					{
						"id": 22,
						"value": this.main_arm_cylinder_left_array[this.main_arm_cylinder_left].name,
						"isConformity": this.main_arm_cylinder_left ? this.main_arm_cylinder_left : 1
					},
					{
						"id": 23,
						"value": this.main_arm_cylinder_right_array[this.main_arm_cylinder_right].name,
						"isConformity": this.main_arm_cylinder_right ? this.main_arm_cylinder_right : 1
					},
					{
						"id": 24,
						"value": this.sub_arm_cylinder_array[this.sub_arm_cylinder].name,
						"isConformity": this.sub_arm_cylinder ? this.sub_arm_cylinder : 1
					},
					{
						"id": 25,
						"value": this.bucket_cylinder_array[this.bucket_cylinder].name,
						"isConformity": this.bucket_cylinder ? this.bucket_cylinder : 1
					},
					{
						"id": 26,
						"value": this.bucket_type,
						"isConformity": 0
					},
					{
						"id": 27,
						"value": this.bucket_facade_array[this.bucket_facade].name,
						"isConformity":  this.bucket_facade ? this.bucket_facade : 1
					},
					{
						"id": 28,
						"value": this.stents_array[this.stents].name,
						"isConformity": this.stents ? this.stents : 1
					},
					{
						"id": 29,
						"value": this.caterpillar_array[this.caterpillar].name,
						"isConformity":  this.caterpillar ? this.caterpillar : 1
					},
					{
						"id": 30,
						"value": this.chain_array[this.chain].name,
						"isConformity": this.chain ? this.chain : 1
					},
					{
						"id": 31,
						"value": this.driving_wheel_array[this.driving_wheel].name,
						"isConformity": this.driving_wheel ? this.driving_wheel : 1
					},
					{
						"id": 32,
						"value": this.driving_door_array[this.driving_door].name,
						"isConformity": this.driving_door ? this.driving_door : 1
					},
					{
						"id": 33,
						"value": this.driving_roof_array[this.driving_roof].name,
						"isConformity": this.driving_roof ? this.driving_roof : 1
					},
					{
						"id": 34,
						"value": this.instrument_array[this.instrument].name,
						"isConformity": this.instrument ? this.instrument : 1
					},
					{
						"id": 35,
						"value": this.hours_instrument_array[this.hours_instrument].name,
						"isConformity": this.hours_instrument ? this.hours_instrument : 1
					},
					{
						"id": 36,
						"value": this.hydraulic_pump_array[this.hydraulic_pump].name,
						"isConformity": this.hydraulic_pump ? this.hydraulic_pump : 1
					},
					{
						"id": 37,
						"value": this.rotary_motor_array[this.rotary_motor].name,
						"isConformity": this.rotary_motor ? this.rotary_motor : 1
					},
					{
						"id": 38,
						"value": this.main_control_array[this.main_control].name,
						"isConformity": this.main_control ? this.main_control : 1
					},
					{
						"id": 39,
						"value": this.battery_array[this.battery].name,
						"isConformity": this.battery ? this.battery : 1
					},
					{
						"id": 40,
						"value": this.engine_array[this.engine].name,
						"isConformity": this.engine ? this.engine : 1
					},
					{
						"id": 41,
						"value": this.engine_nameplate_array[this.engine_nameplate].name,
						"isConformity": this.engine_nameplate ? this.engine_nameplate : 1
					},
					{
						"id": 42,
						"value": this.test_run_array[this.test_run].name,
						"isConformity": this.test_run ? this.test_run : 1
					},
					{
						"id": 43,
						"value": this.test_run_date,
						"isConformity": 0
					},
					{
						"id": 44,
						"value": this.idling_array[this.idling].name,
						"isConformity": this.idling ? this.idling : 1
					},
					{
						"id": 45,
						"value": this.exhaust_array[this.exhaust].name,
						"isConformity": this.exhaust ? this.exhaust : 1
					},
					{
						"id": 46,
						"value": this.travel_array[this.travel].name,
						"isConformity": this.travel ? this.travel : 1
					},
				];
				
				if (!this.brand_name) {
					toast('请填写发动机品牌');
					return false;
				}
				if (!this.bucket_type) {
					toast('请填写挖斗类型');
					return false;
				}
				
				if (!this.test_run  && this.test_run_date == '请选择试车日期') {
					toast('请选择试车日期');
					return false;
				}
				
				showLoading('提交中...');
				uploadTestResultApi({
					id: this.diggerId,
					reportItemList: JSON.stringify(reportItemList)
				}).then(res=>{
					hideLoading();
					uni.navigateTo({
						url: '/pages/upload_detailed_pictures/upload_detailed_pictures' + '?id=' + that.diggerId
					})
				}).catch(err=>{
					toast(err.msg);
					// uni.navigateTo({
					// 	url: '/pages/upload_detailed_pictures/upload_detailed_pictures?id=' + that.id
					// })
					hideLoading();
				})
			}
		}
	}
</script>

<style>
	.menu_content_box {
		position: relative;
		height: calc(100vh - 98rpx);
		background-color: #f7f6f6;
	}

	.consult_immediately_btn {
		display: block;
		height: 98rpx;
		line-height: 98rpx;
		text-align: center;
		font-size: 34rpx;
		font-weight: bold;
		color: #fff;
		background: linear-gradient(90deg, #f44f33, #e10d09);
	}

	.area_block_1 {
		position: relative;
		padding: 27rpx 25rpx 38rpx 15rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.ipt_01 {
		display: inline-block;
		width: 100%;
		height: 76rpx;
		line-height: 76rpx;
		text-align: right;
		padding: 0;
		font-size: 28rpx;
		color: #333;
		background-color: transparent;
		border: none;
		border-radius: 0;
		outline: none;
	}

	.sel_area_sty {
		display: inline-block;
		width: 100%;
		height: 76rpx;
		line-height: 76rpx;
		text-align: right;
		font-size: 28rpx;
		color: #333;
		background: transparent;
	}
</style>
